package com.alibaba.citrus.cr.sales.plan.model;

import lombok.Getter;

/**
 * @author yuhailin
 * @description:计划客户类型
 * @date 2021-09-22 13:45
 */
@Getter
public enum SalesPlanCustomerStatusEnum {
    /**
     * 未完成
     */
    TO_BE_LOCKED(1, "未完成"),

    /**
     * 已完成
     */
    TO_BE_REPLIED(2, "填写已完成"),
    /**
     * 已发布
     */
    PUBLISH(3,"已发布"),
    /**
     * 删除
     */
    DELETE(-1,"删除");


    private Integer code;
    private String desc;

    SalesPlanCustomerStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }


    public static String getDesc(Integer code) {
        for (SalesPlanCustomerStatusEnum salesPlanCustomerStatusEnum : values()) {
            if(salesPlanCustomerStatusEnum.getCode().equals(code))
                return salesPlanCustomerStatusEnum.getDesc();
        }
        return null;
    }
}
